package com.nyist.diseasepreventionserver.util;


import com.nyist.diseasepreventionserver.VO.UserHealthVO;
import com.nyist.diseasepreventionserver.dto.UserDTO;
import com.nyist.diseasepreventionserver.entity.HealthDaily;

//将User HealthDaily整合到UserHealthVO用户前端显示
public class UserHealthUtil {
    public UserHealthVO toVO(UserDTO userDTO){
        HealthDaily healthDaily = userDTO.getHealthDaily();
        UserHealthVO userHealthVO = new UserHealthVO();
        userHealthVO.setUserSid(userDTO.getUserSid());
        userHealthVO.setUserName(userDTO.getUserName());
        userHealthVO.setLocationStatus(healthDaily.getLocationStatus());
        userHealthVO.setHealthStatus(healthDaily.getHealthStatus());
        userHealthVO.setTemperature(healthDaily.getTemperature());
        userHealthVO.setContact(healthDaily.getContact());
        return userHealthVO;
    }
}
